/**
 * @应用指针和函数
 *
 * @author	 wangshikun <wangshikun2010@gmail.com>
 * @copyright	(c) 2012 wangshikun <wangshikun2010@gmail.com>
 * @license	http://www.opensource.org/licenses/mit-license.php The MIT License
 * @package	default
 * @subpackage	default
 */

#include <stdio.h>

// 函数声明，参数是一个整型的指针变量
void test (int *int_pointer);

int main(void) {
	int i = 50, *p = &i;

	printf("Before the call to test i = %d\n", i);

	// 调用指针函数
	test(p);
	printf("After the call to test i = %d\n", i);

	return 0;
}

void test (int *int_pointer) {
	*int_pointer = 100;
}
